home *** CD-ROM | disk | FTP | other *** search
- CLK26.COM / ALMCLK26.COM Jan 8, 1986
- By Scott Strench
-
- CLK26 and it's newest update, ALMCLK26, are resident on-screen clocks
- for the IBM PC family and close compatibles. Both have been tested on PC's,
- XT's, and Jr's, and no one has complained (so-far) of unexpected behavior.
- However, I wrote CLK26 for my own use; I don't guarantee success on any machine
- but my own. If you find these utilities work well, and you like what you see,
- you're welcome to them; if not, DEL works quite well.
-
- First, some technical background. I had tried several of the clocks that
- are available on most BBS's, with varying degrees of success. With the
- exception of CLOCK.COM (1024 bytes) all had caused lockup within 10 minutes.
- CLOCK.COM worked better, but still locked up eventually. I tried debugging
- a few to try and improve, but found it easier to write my own.
- Debugging did provide 2 basic constraints: (1) Displaying the time should
- be done by writing directly to the video buffer, avoiding video interrupts;
- clocks using INT 10h invariably failed. (2) Time should be displayed where it
- would not interfere with what is already on-screen.
- After a few hours of reading from the Tech Ref manual, I decided to display
- the time at the bottom of the screen, in the normally unused border area.
- This requires modifying the video chips' internal registers to allow 26 lines,
- which isn't a problem but does require that the 6845 video chip be used.
- IF YOUR VIDEO CARD DOESN'T USE THE 6845 CHIP OR *EXACT* REPLACEMENT, I DOUBT
- CLK26 WILL WORK!
- In particular, CLK26 writes to the 6845's register R6 - Vertically displayed
- rows - changing the normal value of 25 to 26. This is accomplished by writing
- to PC ports 3D4h & 3D5h; if your machine doesn't have these ports, forget it.
- Since BIOS assumes 25 lines, line 26 is untouched by all video functions,
- making it the ideal place to display a 'status' line.
-
- The first test of CLK26 didn't worry about what else might happen with the
- video circuitry, and just modified R6. This proved that changing video modes
- or pages caused problems. The next version intercepted the video interrupt
- and ensured that the time is displayed only in 80-column textmodes (2 & 3)
- on page 0. Any other mode/page causes CLK26 to disable 26 lines and disappear
- from view; it still runs in the background waiting for the correct mode/page
- combination to reoccur, whereupon it will reappear (after a delay).
- One annoyance - Line 26 is halfway between page's 0 and 1. If a program
- switches to page 1, half of the time line is displayed on line 1. Fixing
- this would be no problem, but I seldom switch pages and all programs I use
- that do switch to page 1 are well mannered enough to clear the screen.
- ALMCLK26 is the first revision of CLK26 v1, and is self explanatory.
- CTRL-ALT-S will set an alarm to the time you specify; the time must be entered
- as 4 digits in 24hr format - 2359 for 11:59pm. The alarm will sound until you
- press CTRL-ALT-A or 1 minute passes. An asterisk is displayed at the far
- right of the time line if the alarm is set. Also, ALMCLK26 beeps on the hour.
- CLK26m.COM and ALMCLKm.COM have been modified for monochrome monitors.
- They *HAVE NOT* been tested, and I have no way of knowing if they'll work;
- I don't even know if the mono card uses the 6845.
-
- As I said, if these programs work for you and you like them - enjoy! If
- not - DEL! Any comments or suggestions can be directed to me through the
- TELESTAR BBS (512-822-8882) or the other San Antonio IBM boards. If you're
- interested in the source, the same applies.
-
- Scott Strench.
-
- PS - Now the real question... Why go to all the trouble of writing 60 lines
- of nonsense to explain a program that I wrote mainly because I was bored?
- Simple. An edited version of this nonsense is eventually going to get me
- an 'A' on a 2-week project in Technical Writing. I'm a firm believer in
- taking the course of least resistence...